<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/order/orderInfo/orderInfo.js"></script>
    <link rel="stylesheet" href="${ctx}/statics/css/update.css">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css">
    <style>
        /*.fixed-table-pagination,.fixed-table-header,.fixed-table-toolbar{*/
        /*position: fixed;*/
        /*}*/
        /*.fixed-table-body{*/
        /*padding-top: 50px;*/
        /*}*/
        /*.bootstrap-table .fixed-table-container.fixed-height .fixed-table-border{*/
        /*border: none;*/
        /*}*/
        .fixed-table-border {
            height: auto !important;
        }

        .fixed-table-header {
            margin-right: 0 !important;
        }
    </style>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>充电管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>充电实时信息列表</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>充电实时信息详情</a>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</li>' +
            '</ol>';
    });
</script>

<body class="gray-bg orderContentBody">
<div class="wrapper wrapper-content ">
    <div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <div class="columns pull-left">
                    <h5 class="font-bold">充电实时信息</h5>
                </div>
                <div class="ibox-tools">
                    <a class="close-link">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
            </div>

            <div class="ibox-content">
                <form class="form-horizontal m-t" >
                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">订单编号</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="orderNumId"   readonly
                                   value="${log.orderNum}">

                        </div>
                        <label class="col-sm-1 col-form-label text-right">通讯时间</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"  readonly
                                   value="${log.createTime}">
                        </div>
                    </div>

                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">充电枪编号</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="gunNo"   readonly
                                   value="${log.gunNo}">

                        </div>
                        <label class="col-sm-1 col-form-label text-right">充电枪短编号</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"  readonly
                                   value="${log.pileSort}+号桩">
                        </div>
                    </div>

                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">站点名称</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="stationName"   readonly
                                   value="${log.stationName}">

                        </div>
                        <label class="col-sm-1 col-form-label text-right">所属加盟商</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"  readonly
                                   value="${log.operatorName}">
                        </div>
                    </div>

                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">用户</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="nickName"   readonly
                                   value="${log.nickName}">

                        </div>
                        <label class="col-sm-1 col-form-label text-right">车牌号</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"  readonly
                                   value="${log.carNumber}">
                        </div>
                    </div>

                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">枪温度(℃)</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="temperatureGun"   readonly
                                   value="${log.temperatureGun}">

                        </div>
                        <label class="col-sm-1 col-form-label text-right">功率(KW)</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"  readonly
                                   value="${log.gunPower}">
                        </div>
                    </div>

                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">电流(A)</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="elec"   readonly
                                   value="${log.elec}">

                        </div>
                        <label class="col-sm-1 col-form-label text-right">电压(V)</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"  readonly
                                   value="${log.voltage}">
                        </div>
                    </div>

                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">BMS电流(A)</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="demandElec"   readonly
                                   value="${log.demandElec}">

                        </div>
                        <label class="col-sm-1 col-form-label text-right">BMS电压(V)</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"  readonly
                                   value="${log.demandVoltage}">
                        </div>
                    </div>

                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">BMS温度(℃)</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"   readonly
                                   value="${log.temperatureGun}">

                        </div>
                        <label class="col-sm-1 col-form-label text-right">SOC(%)</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control"  readonly
                                   value="${log.soc}">
                        </div>
                    </div>

                    <div class="form-group row" class="col-sm-12">
                        <label class="col-sm-1 col-form-label text-right">金额</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="totalAmount"   readonly
                                   value="${log.totalAmount}">

                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</div>
</body>
</html>
<script>
    var oNum = '';
    $(function () {
        var orderNumId = $("#orderNumId").val();
        if (orderNumId!=''&&orderNumId!=undefined){
            oNum = orderNumId;
        }
    });
    layui.use(['table'], function() {
        var  table = layui.table;
        table.render({
            elem: '#stationPirceId',  // 指向页面组件id
            where: { outOrderNum: oNum },  // 传递参数
            url: jsctx + '/orderDetail/getDetailByOrderNum/',  // 异步获取数据
            cellMinWidth: 95,
            page: false,  //
            parseData:function(res){
                /debugger
                //let resData = res.data;
                return {
                    "code": 0,
                    "msg": "",
                    "count": res.length,//解析数据总条数
                    "data": res //解析数据列表
                }
            },
            cols: [[
                {field: '', title: '时间段', width: '500', align: 'center',
                    templet: function(row) {
                        return '<span >'+row.beginTime+'~'+row.endTime+'</span>'
                    }},
                {field: 'elecPrice', title: '电费单价', width: '150', align: 'center'},
                {field: 'servicePrice', title: '服务费单价', width: '150', align: 'center'},
                {field: 'chargeAmount', title: '合计', width: '150', align: 'center'}
            ]]
        });
    });
</script>
